//
//  DXNet.h
//  suremodv
//
//  Created by dd on 13-11-30.
//  Copyright (c) 2013年 xiaomuzhi. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "DX.h"
#import "DXData.h"
#import "DXLog.h"
#import "DXUtil.h"

@interface DX (NET)

+ (void)reach;
+ (NSString *) urlEncode:(NSString *) string;
+ (NSString *) urlDecode:(NSString *) string;
+ (void) validateResponse:(id)object;

+ (NSString *) urlOfAction:(NSString *)action;
+ (NSMutableDictionary *) prepareParams;
+ (id)POST:(NSString *)action
parameters:(NSDictionary *)parameters
controller:(UIViewController *)controller
   success:(void (^)(NSDictionary *response))success
   failure:(void (^)(NSError *error))failure
failureAlert:(BOOL)failureAlert;
+ (id)RAWPOST:(NSString *)url
   parameters:(NSDictionary *)parameters
   controller:(UIViewController *)controller
      success:(void (^)(id responseObject))success
      failure:(void (^)(NSError *error))failure
 failureAlert:(BOOL)failureAlert;
 
@end
